//
//  BVMineSpouseDataCell.m
//  XiangYu
//
//  Created by YYKJ on 2017/6/26.
//  Copyright © 2017年 YYKJ. All rights reserved.
//

#import "BVMineSpouseDataCell.h"

@implementation BVMineSpouseDataCell

-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self) {
        [self layoutUI];
    }
    
    return self;
}

-(void)layoutUI{
    
    self.titleLb = [[UILabel alloc]init];
    self.titleLb.textColor = [UIColor BVTextDarkGrayColor];
    self.titleLb.textAlignment = NSTextAlignmentLeft;
    self.titleLb.font = [UIFont systemFontOfSize:14];
    [self.contentView addSubview:self.titleLb];
    self.titleLb.sd_layout
    .topSpaceToView(self.contentView,5)
    .leftSpaceToView(self.contentView,10)
    .bottomSpaceToView(self.contentView,5);
    [self.titleLb setSingleLineAutoResizeWithMaxWidth:140];
    
    self.contentLb = [[UILabel alloc]init];
    self.contentLb.textColor = [UIColor BVTextGrayColor];
    self.contentLb.textAlignment = NSTextAlignmentRight;
    self.contentLb.font = [UIFont systemFontOfSize:14];
    [self.contentView addSubview:self.contentLb];
    self.contentLb.sd_layout
    .topSpaceToView(self.contentView,5)
    .rightSpaceToView(self.contentView, 0)
    .bottomSpaceToView(self.contentView,5)
    .widthIs(self.contentView.width/2);
    //[self.contentLb setText:@"末代皇帝"];
    
}

-(void)setModel:(BVMineModel *)model{
    _model = model;
    
    if (self.index.section == 0) {
        switch (self.index.row) {
            case 0:{
                [self.contentLb setText:@"18-19"];
            }
                break;
            case 1:{
                [self.contentLb setText:model.spouse_height];
            }
                break;
            case 2:{
                [self.contentLb setText:model.spouse_education];
            }
                break;
            case 3:{
                [self.contentLb setText:model.spouse_address];
            }
                break;
            case 4:{
                [self.contentLb setText:@"暂无"];
            }
                break;
            case 5:{
                [self.contentLb setText:model.spouse_faith];
            }
                break;
            case 6:{
                [self.contentLb setText:model.spouse_maritalStatus];
            }
                break;
            case 7:{
                [self.contentLb setText:model.spouse_housePurchase];
            }
                break;
            case 8:{
                [self.contentLb setText:model.spouse_carPurchase];
            }
                break;

            case 9:{
                [self.contentLb setText:model.spouse_monthlySalary];
            }
                break;
            case 10:{
                [self.contentLb setText:model.spouse_liveParents];
            }
                break;
            case 11:{
                [self.contentLb setText:model.spouse_wantChild];
            }
                break;
            default:
                break;
        }
            }else{
                
        [self.contentLb setText:@""];
    }
}

- (void)awakeFromNib {
    [super awakeFromNib];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
}

@end
